import java.util.Scanner;

public class Ex2_6{
	public static void main(String[] args){
		System.out.print("Enter a number between 0 and 1000: ");
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int g = n % 10;
		n /= 10;
		int s = n % 10;
		int b = n / 10;
		int sum = g + s + b;
		System.out.println("The sum of the digits is " + sum);
	}
}